﻿using System;
using System.Diagnostics;
using System.Reflection;

namespace Adjunct.Build
{
	internal static class TestHelper
	{
		[Conditional("DEBUG")]
		public static void Dump(string message)
		{
			Console.WriteLine(message);
		}

		public static string GetProjectDirectory()
		{
			string path = Assembly.GetExecutingAssembly().CodeBase;
			int start = path.StartsWith("file:") ? 8 : 0;
			int end = path.IndexOf("bin");
			path = path.Substring(start, end - start);
			return path;
		}
	}
}